package com.lei.chinese_herbal_medicine.Entity;

import java.io.Serializable;

public class Herb implements Serializable {
    private String id;

    private String herbName;

    private String latinName;

    private String herbTypeId;

    private String medicinalPart;

    private String alias;

    private String plantMorphology;

    private String originDistribution;

    private String harvestingProcessing;

    private String drugProperties;

    private String natureFlavor;

    private String channelTropism;

    private String efficacyEffect;

    private String clinicalApplication;

    private String pharmacologicalResearch;

    private String chemicalComponent;

    private String usageTaboo;

    private String compatiblePrescription;

    private byte[] img=null;

    private static final long serialVersionUID = 1L;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getHerbName() {
        return herbName;
    }

    public void setHerbName(String herbName) {
        this.herbName = herbName == null ? null : herbName.trim();
    }

    public String getLatinName() {
        return latinName;
    }

    public void setLatinName(String latinName) {
        this.latinName = latinName == null ? null : latinName.trim();
    }

    public String getHerbTypeId() {
        return herbTypeId;
    }

    public void setHerbTypeId(String herbTypeId) {
        this.herbTypeId = herbTypeId == null ? null : herbTypeId.trim();
    }

    public String getMedicinalPart() {
        return medicinalPart;
    }

    public void setMedicinalPart(String medicinalPart) {
        this.medicinalPart = medicinalPart == null ? null : medicinalPart.trim();
    }

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias == null ? null : alias.trim();
    }

    public String getPlantMorphology() {
        return plantMorphology;
    }

    public void setPlantMorphology(String plantMorphology) {
        this.plantMorphology = plantMorphology == null ? null : plantMorphology.trim();
    }

    public String getOriginDistribution() {
        return originDistribution;
    }

    public void setOriginDistribution(String originDistribution) {
        this.originDistribution = originDistribution == null ? null : originDistribution.trim();
    }

    public String getHarvestingProcessing() {
        return harvestingProcessing;
    }

    public void setHarvestingProcessing(String harvestingProcessing) {
        this.harvestingProcessing = harvestingProcessing == null ? null : harvestingProcessing.trim();
    }

    public String getDrugProperties() {
        return drugProperties;
    }

    public void setDrugProperties(String drugProperties) {
        this.drugProperties = drugProperties == null ? null : drugProperties.trim();
    }

    public String getNatureFlavor() {
        return natureFlavor;
    }

    public void setNatureFlavor(String natureFlavor) {
        this.natureFlavor = natureFlavor == null ? null : natureFlavor.trim();
    }

    public String getChannelTropism() {
        return channelTropism;
    }

    public void setChannelTropism(String channelTropism) {
        this.channelTropism = channelTropism == null ? null : channelTropism.trim();
    }

    public String getEfficacyEffect() {
        return efficacyEffect;
    }

    public void setEfficacyEffect(String efficacyEffect) {
        this.efficacyEffect = efficacyEffect == null ? null : efficacyEffect.trim();
    }

    public String getClinicalApplication() {
        return clinicalApplication;
    }

    public void setClinicalApplication(String clinicalApplication) {
        this.clinicalApplication = clinicalApplication == null ? null : clinicalApplication.trim();
    }

    public String getPharmacologicalResearch() {
        return pharmacologicalResearch;
    }

    public void setPharmacologicalResearch(String pharmacologicalResearch) {
        this.pharmacologicalResearch = pharmacologicalResearch == null ? null : pharmacologicalResearch.trim();
    }

    public String getChemicalComponent() {
        return chemicalComponent;
    }

    public void setChemicalComponent(String chemicalComponent) {
        this.chemicalComponent = chemicalComponent == null ? null : chemicalComponent.trim();
    }

    public String getUsageTaboo() {
        return usageTaboo;
    }

    public void setUsageTaboo(String usageTaboo) {
        this.usageTaboo = usageTaboo == null ? null : usageTaboo.trim();
    }

    public String getCompatiblePrescription() {
        return compatiblePrescription;
    }

    public void setCompatiblePrescription(String compatiblePrescription) {
        this.compatiblePrescription = compatiblePrescription == null ? null : compatiblePrescription.trim();
    }

    public byte[] getImg() {
        return img;
    }

    public void setImg(byte[] img) {
        this.img = img;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Herb other = (Herb) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getHerbName() == null ? other.getHerbName() == null : this.getHerbName().equals(other.getHerbName()))
            && (this.getLatinName() == null ? other.getLatinName() == null : this.getLatinName().equals(other.getLatinName()))
            && (this.getHerbTypeId() == null ? other.getHerbTypeId() == null : this.getHerbTypeId().equals(other.getHerbTypeId()))
            && (this.getMedicinalPart() == null ? other.getMedicinalPart() == null : this.getMedicinalPart().equals(other.getMedicinalPart()))
            && (this.getAlias() == null ? other.getAlias() == null : this.getAlias().equals(other.getAlias()))
            && (this.getPlantMorphology() == null ? other.getPlantMorphology() == null : this.getPlantMorphology().equals(other.getPlantMorphology()))
            && (this.getOriginDistribution() == null ? other.getOriginDistribution() == null : this.getOriginDistribution().equals(other.getOriginDistribution()))
            && (this.getHarvestingProcessing() == null ? other.getHarvestingProcessing() == null : this.getHarvestingProcessing().equals(other.getHarvestingProcessing()))
            && (this.getDrugProperties() == null ? other.getDrugProperties() == null : this.getDrugProperties().equals(other.getDrugProperties()))
            && (this.getNatureFlavor() == null ? other.getNatureFlavor() == null : this.getNatureFlavor().equals(other.getNatureFlavor()))
            && (this.getChannelTropism() == null ? other.getChannelTropism() == null : this.getChannelTropism().equals(other.getChannelTropism()))
            && (this.getEfficacyEffect() == null ? other.getEfficacyEffect() == null : this.getEfficacyEffect().equals(other.getEfficacyEffect()))
            && (this.getClinicalApplication() == null ? other.getClinicalApplication() == null : this.getClinicalApplication().equals(other.getClinicalApplication()))
            && (this.getPharmacologicalResearch() == null ? other.getPharmacologicalResearch() == null : this.getPharmacologicalResearch().equals(other.getPharmacologicalResearch()))
            && (this.getChemicalComponent() == null ? other.getChemicalComponent() == null : this.getChemicalComponent().equals(other.getChemicalComponent()))
            && (this.getUsageTaboo() == null ? other.getUsageTaboo() == null : this.getUsageTaboo().equals(other.getUsageTaboo()))
            && (this.getCompatiblePrescription() == null ? other.getCompatiblePrescription() == null : this.getCompatiblePrescription().equals(other.getCompatiblePrescription()))
            && (this.getImg() == null ? other.getImg() == null : this.getImg().equals(other.getImg()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getHerbName() == null) ? 0 : getHerbName().hashCode());
        result = prime * result + ((getLatinName() == null) ? 0 : getLatinName().hashCode());
        result = prime * result + ((getHerbTypeId() == null) ? 0 : getHerbTypeId().hashCode());
        result = prime * result + ((getMedicinalPart() == null) ? 0 : getMedicinalPart().hashCode());
        result = prime * result + ((getAlias() == null) ? 0 : getAlias().hashCode());
        result = prime * result + ((getPlantMorphology() == null) ? 0 : getPlantMorphology().hashCode());
        result = prime * result + ((getOriginDistribution() == null) ? 0 : getOriginDistribution().hashCode());
        result = prime * result + ((getHarvestingProcessing() == null) ? 0 : getHarvestingProcessing().hashCode());
        result = prime * result + ((getDrugProperties() == null) ? 0 : getDrugProperties().hashCode());
        result = prime * result + ((getNatureFlavor() == null) ? 0 : getNatureFlavor().hashCode());
        result = prime * result + ((getChannelTropism() == null) ? 0 : getChannelTropism().hashCode());
        result = prime * result + ((getEfficacyEffect() == null) ? 0 : getEfficacyEffect().hashCode());
        result = prime * result + ((getClinicalApplication() == null) ? 0 : getClinicalApplication().hashCode());
        result = prime * result + ((getPharmacologicalResearch() == null) ? 0 : getPharmacologicalResearch().hashCode());
        result = prime * result + ((getChemicalComponent() == null) ? 0 : getChemicalComponent().hashCode());
        result = prime * result + ((getUsageTaboo() == null) ? 0 : getUsageTaboo().hashCode());
        result = prime * result + ((getCompatiblePrescription() == null) ? 0 : getCompatiblePrescription().hashCode());
        result = prime * result + ((getImg() == null) ? 0 : getImg().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", herbName=").append(herbName);
        sb.append(", latinName=").append(latinName);
        sb.append(", herbTypeId=").append(herbTypeId);
        sb.append(", medicinalPart=").append(medicinalPart);
        sb.append(", alias=").append(alias);
        sb.append(", plantMorphology=").append(plantMorphology);
        sb.append(", originDistribution=").append(originDistribution);
        sb.append(", harvestingProcessing=").append(harvestingProcessing);
        sb.append(", drugProperties=").append(drugProperties);
        sb.append(", natureFlavor=").append(natureFlavor);
        sb.append(", channelTropism=").append(channelTropism);
        sb.append(", efficacyEffect=").append(efficacyEffect);
        sb.append(", clinicalApplication=").append(clinicalApplication);
        sb.append(", pharmacologicalResearch=").append(pharmacologicalResearch);
        sb.append(", chemicalComponent=").append(chemicalComponent);
        sb.append(", usageTaboo=").append(usageTaboo);
        sb.append(", compatiblePrescription=").append(compatiblePrescription);
        sb.append(", img=").append(img);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
